/**
 * Created by jianglinjie on Mon Oct 09 2017
 * 
 */
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var ConfigService = function () {
  function ConfigService() {
    _classCallCheck(this, ConfigService);

    this._apiBaseHost = '';
  }

  _createClass(ConfigService, [{
    key: 'apiBaseHost',
    get: function get() {
      return this._apiBaseHost;
    }

    //外部需要设置apiBase
    ,
    set: function set(host) {
      if (host.length && host.slice(host.length - 1) === '/') {
        host = host.slice(0, host.length - 1);
      }

      this._apiBaseHost = host;
    }

    //外部需要设置

  }, {
    key: 'storage',
    get: function get() {
      return this._storage;
    },
    set: function set(s) {
      this._storage = s;
    }
  }]);

  return ConfigService;
}();

exports.default = new ConfigService();